
<template>
  <div class="homeview">
    <transition name="ly" mode="out-in">
      <keep-alive>
        <router-view> </router-view>
      </keep-alive>
    </transition>
    <van-tabbar v-model="active" route>
      <van-tabbar-item icon="home-o" name="/homeview/list" to="/homeview/list"
        >首页</van-tabbar-item
      >
      <van-tabbar-item icon="fire-o" name="/homeview/bao" to="/homeview/bao"
        >爆爆团</van-tabbar-item
      >
      <van-tabbar-item
        icon="friends-o"
        name="/homeview/dingdan"
        to="/homeview/dingdan"
        >订单</van-tabbar-item
      >
      <van-tabbar-item
        icon="setting-o"
        name="/homeview/wode"
        to="/homeview/wode"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: this.$route.path,
    };
  },
};
</script>

<style scoped>
.ly-enter {
  /* 入场动画的初始状态 */
  transform: scale(0);
}
.ly-enter-active {
  /* 入场动画执行过程中的状态 */
  transition: all 0.5s;
}
.ly-enter-to {
  /* 入场动画执行结束时的状态 */
  transform: scale(1);
}

.ly-leave {
  /* 离场动画的初始状态 */
  transform: scale(1);
}
.ly-leave-active {
  /* 离场动画执行过程中的状态 */
  transition: all 0.3s;
}
.ly-leave-to {
  /* 离场动画执行结束时的状态 */
  transform: scale(0);
}
</style>

